﻿namespace DeltaGroup.WheelOfJeopardy.UI.ViewModel
{
    using System.ComponentModel;

    public class BaseViewModel : INotifyPropertyChanged
    {
        #region Events

        /// <summary>
        /// Occurs when a property value changes.
        /// </summary>
        public event PropertyChangedEventHandler PropertyChanged;

        #endregion Events

        #region Methods

        /// <summary>
        /// Fires the property changed.
        /// </summary>
        /// <param name="name">The name.</param>
        protected void FirePropertyChanged(string name)
        {
            if (PropertyChanged == null)
                return;

            PropertyChanged(this, new PropertyChangedEventArgs(name));
        }

        #endregion Methods
    }
}